package com.hefeng.unit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hefeng.unit.domain.GyDeviceReport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface GyDeviceReportMapper extends BaseMapper<GyDeviceReport> {
    @Select("SELECT\n" +
            "\tgy_device_report.report_time\n" +
            "FROM\n" +
            "\tgy_device_report\n" +
            "WHERE\n" +
            "\tgy_device_report.device_code = #{deviceCode}\n" +
            "ORDER BY\n" +
            "\tgy_device_report.report_time DESC\n" +
            "LIMIT 1 ")
    GyDeviceReport selectByTime(String deviceCode);
}
